<script type="text/javascript">

function confirmation(){
   
    var total='';
    var id=[];
    for(var i=0; i < document.papersize_delete.papersizes.length; i++){
if(document.papersize_delete.papersizes[i].checked)
{total +=document.papersize_delete.papersizes[i].value + "\n";

}
}
if(total==""){
alert("Please select paper size");
return false;
}
else{
    if(confirm('Are you sure to delete ?'))
       document.papersize_delete.submit();
    else
        return false;

}
  
 
    
}
</script>


<!--End  List-->

<?php 
$CI =& get_instance();
$CI->load->library("admin/admin_header_lib");
$CI->admin_header_lib->display_header_element(array("script"=>array("jquery-1.4.2","jquery.validate","jquery.metadata")));
$CI->admin_header_lib->display_header();

$CI->load->library('admin/admin_sidebar_lib');
$CI->admin_sidebar_lib->display_sidebar();

?>

<div class="admin_right">
<div class="height7"></div>
<?php
$attributes = array('name' => 'papersize_delete', 'id' => 'papersize_delete','class' =>'papersize_delete');
 echo form_open('admin/paper_sizes/delete',$attributes);?>
<div class="div0013">
	<div class="div20"><h2 class="head02">paper sizes</h2></div>
    <div class="div22"><a class="red13" href="<?php echo site_url('admin/paper_sizes/form' )?>">< add new paper size</a></div>
    <div class="clear"></div>
    <div class="line6"></div>
    <ul>
      <?php if(!empty($paper_sizes)): ?>
      <?php foreach($paper_sizes as $key=>$value): ?>
    	<li>
        	<div class="div20"><?php echo $value['papersize_title'] ?></div>
            <div class="div00035"><?php echo $value['papersize_width'].' x '.$value['papersize_height'].' mm' ;?></div>
            <div class="div27"><input type="checkbox" name="papersizes[]" id="papersizes" class="papersizes"   value="<?php echo $value['papersize_id']?>" /></div>
            <div class="div012"><a href="<?php echo site_url('admin/paper_sizes/form/'.$value['papersize_id'].'/'.$page); ?>">Edit</a></div>
            <div class="clear"></div>
            <div class="line6"></div>
        </li>
         <?php endforeach; ?>
        <?php endif; ?>
        <div class="height5"></div>
        <li>
        	<div class="div20"><a class="red13" href="<?php echo site_url('admin/paper_sizes/form' )?>">< add new paper size</a></div>
            <div class="div25_right">
            <input type="submit" name="delete" onclick="return confirmation()" value="Delete Selected"/>
    		</div>
      <div class="clear"></div>
        </li>
    </ul>
</div>
</form>

<div class="line6"></div>
<div class="height5"></div>
	<div class="pagination">
		<?php echo $pagination; ?>
        <div class="clear"></div>
	</div>
    <div class="height5"></div>
<div class="line6"></div>
<?php /*  end of all  content  */ ?>
</div><!-- page noright -->



<?php  $this->load->view(TEMPLATE_NAME.'/admin/footer');?>